﻿using UnityEngine;
using UnityEditor;
using PureMVC.Patterns;
using PureMVC.Interfaces;
using OrderSystem;

public class ClientPayToWaiterCommand : SimpleCommand
{
    public override void Execute(INotification notification)
    {
        base.Execute(notification);
        ClientProxy clientProxy = Facade.RetrieveProxy(ClientProxy.NAME) as ClientProxy;

         clientProxy.UpdatePayState(notification.Body as ClientItem);

        SendNotification(OrderSystemEvent.WAITER_GET_PAY, notification.Body);
    }
}